<template>
    <div id='container'>
        <h2>评论回复:</h2>
        <h1 v-if="!userData.length">暂无回复,点击左侧添加评论!!!</h1>
        <div v-for="(item) in userData" :key="item.id">
            <CommentItem :commentObj="item" :removeCommentItem="removeCommentItem"></CommentItem>
        </div>
    </div> 
</template>

<script>
import CommentItem from '../CommentItem'
export default {
    name: 'CommentList',
    components: {
        CommentItem
    },
    props: ['userData','removeCommentItem']
}
</script>